#include <iostream>
#include <string>
using namespace std;
class Stu1
{
	string name;
public:
	Stu()
	{
		name = "ZHUBICEN";
	}
	void Display()const
	{
		cout<<name<<endl;
	}
	void GetInput(istream & in = cin)
	{
		char ch;
		name ="";
		in>>ch;
		if(!in.fail())
		{
			do
			{
				name += ch;
				in.get(ch);
			}while( !in.fail() && !isspace(ch));
		}
	}
};
ostream & operator <<(ostream &out,const Stu1 &s)
{
	s.Display();
	return out;
}
istream & operator >>( istream & in,Stu1 & s)
{
	s.GetInput(in);
	return in;
}
class Stu2
{
	char *name;
public:
	Stu2()
	{
	}
	Stu2( char*InitName)
	{
		name = new char[strlen(InitName)+1];
		strcpy(name,InitName);
	}
	/*Stu2(const Stu2 &s)
	{
		this->name = new char[strlen(s.name)+1];
		strcpy(this->name,s.name);
	}*/
		
	const Stu2 & operator = (const Stu2 & s)
	{
		if( this != &s)
		{
			this->name = new char[strlen(s.name)+1];
			strcpy(this->name,s.name);
		}
		cout<<"In the fucton operate ============="<<endl;
		return *this;		
	}
	void Display(ostream &out = cout)
	{
		cout<<"The student name is :"<<name<<endl;;
	}
	~Stu2()
	{
		if( name != NULL)
			delete[] name;

	}
};
void Debug()
{
	Stu2 s1("HIGHHILL!");
	s1.Display();
	//use the Stu2(Const stu&s) convention
	//Stu2 s2 = s1;//differ from  Stu2 = bi ; bi = zhu 
	
	Stu2 bi;
	bi =s1;
	s1.Display();
}
